Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change property condition check to a function, add nestng support. #98

Merged
merged 3 commits into from
Mar 23, 2022

Conversation

h2zero
Copy link
Member

@h2zero h2zero commented Mar 22, 2022

Description:

Moves the property condition check to a new function. This allows for the use of nested arrays as the function can be called recursively.

Example (json array nesting):

"condition":[["manufacturerdata", 10, "8", "|", "manufacturerdata", 10, "9", "|", "manufacturerdata", 10, "a", "|", "manufacturerdata", 10, "b"], "&", "manufacturerdata", 14, "!", "ffff"]
  • Added some macros for "servicedata" and "manufacturerdata" to make the code cleaner.

TODO: docs

Checklist:

  • The pull request is done against the latest development branch
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • I accept the DCO.

@DigiH
Copy link
Member

DigiH commented Mar 22, 2022

LGTM with passing all the extra NOT tests

@1technophile
Copy link
Member

Thanks guys!

h2zero added 2 commits March 22, 2022 20:01
* Add macros for "servicedata" and "manufacturerdata"

* Add support for nested arrays in property conditions.

* Allow for using NOT property conditions at any position.

This will allow for the NOT condition to be placed in any position within a property condition, allowing for greater efficiency.

* Minor code cleanup
@h2zero h2zero force-pushed the check-prop-cond-func branch from 021c14b to d8500b4 Compare March 23, 2022 02:02
@1technophile
Copy link
Member

Thanks!

@1technophile 1technophile merged commit 273c8af into development Mar 23, 2022
@1technophile 1technophile deleted the check-prop-cond-func branch March 23, 2022 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants